
<!-- 懒加载 引入开始 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"></script>
<!-- 懒加载 引入结束 -->
<script src="https://res.dcdev.net/dcdev/v1.0.6/assets/js/render_somthing.js"></script>

<div id="container" style="width:90vw;"></div>

<script>
    var pic_list;
    pic_list = new render_somthing();
    pic_list.init({
        // div的id
        id: "#container",
        // x/y/flow   分别为x向滚动、y向滚动、瀑布流
        method: "y",
        // 容器是指即将渲染内容的外围容器，可以为div/table/ul ...
        container: {
            html: `
<div ></div>
`
        },
        // 渲染内容的配置
        content: {
            default: `
        <img class="lazy" data-original="#{href}" style="width:100%;">
`,
        },
        // 条件渲染内容
                /*
                    ^{ROW_INDEX} - 常量，表示数据数组的下标
                    #{title}     - 变量，表示数据数组中对象的key
                */
                condition: [{
                        expression: "",
                        html: `
                        `}],
        callback: {
            click: function (res) {

            }
        },
    });
        pic_list.render([
        {href:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/thumbs/1-1.jpg",src:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/thumbs/1-1.jpg"},
        {href:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-2.jpg",src:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-2.jpg"},
        {href:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-4.jpg",src:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-4.jpg"},
        {href:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-8.jpg",src:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-8.jpg"},
        {href:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-6.jpg",src:"http://www.bitauto.com/zhuanti/region/js2015/demo/018/baguetteBox/img/1-6.jpg"}
    ]);
    $(function() {
        $("img.lazy").lazyload({effect: "fadeIn"});
    });
</script>